<div style="height:auto;width:100%">
<table class="tblInfo" id="fmhistoryprojector_tblinfo" width="100%">
<tr>
<td class="width25" height="400" valign="top"> 
<table class="info" id="fmhistoryprojector_info">
<tr>
<td>
<div  class="divleft">
<table class="width100">
<tr >
<td  class="lblRequired width30">Thời gian</td>
<td ><input id="fmhistoryprojector_date1" onblur="formatddmmyyyy(this)" maxlength="10"  class="txtRequired width35" /><a href="javascript:fmhistoryprojector_cal1.popup();"><img src="adagps.com/images/cal/cal2.png" id="fmhistoryprojector_imgcal1"   class="datepicker dpkstart" ></a>
-<input id="fmhistoryprojector_date2" onblur="formatddmmyyyy(this)" maxlength="10"  class="txtRequired width35" /><a href="javascript:fmhistoryprojector_cal2.popup();"><img src="adagps.com/images/cal/cal2.png" id="fmhistoryprojector_imgcal2"   class="datepicker dpkend" ></a>
</td>
</tr>       
</table>
 
</div>
</td>
</tr>
<tr >
<td >
<button id="frmreportdetail_create" class="btnreport" onclick="fmhistoryprojector_createReport();" type="button"> Xem </button>
</td>
</tr>
</table>
</td>
<td class="clsmiddle"></td>
<td height="400" valign="top" align="center">
<div id="fmhistoryprojector_divDetail" class="divDialog" align="center"> 
<table class="width100">
<tr>
<td class="width100">
<div id="fmhistoryprojector_divDetail_grid" >
</div> 
</td>
</tr>
<tr>
<td>
<button class="cancelDialog"> Đóng</button>
</td>
</tr>
</table>
</div>
<div id="fmhistoryprojector_divGrid" class="divGrid"></div></td>
<td class="clsend"></td>
</tr>
</table>
 <script language="javascript">
var fmhistoryprojector_cal1 = CreateCalObject('fmhistoryprojector_date1', 'fmhistoryprojector_imgcal1'); 
var fmhistoryprojector_cal2 = CreateCalObject('fmhistoryprojector_date2', 'fmhistoryprojector_imgcal2'); 
$(document).ready(function () {
    initForm('fmhistoryprojector_tblinfo');
    initDivleft();
    $('#fmhistoryprojector_divDetail').dialog({
        autoOpen: false,
        modal: true,
        width: 800,
        resizable: true,
        overflow: 'auto' 
    }); 
});

function fmhistoryprojector_createReport(){
    if(!checkDate('fmhistoryprojector_date1','fmhistoryprojector_date2',90)){
        return false;
    }
 fromdate = ConvertoDateEN($('#fmhistoryprojector_date1').val());
 todate = ConvertoDateEN($('#fmhistoryprojector_date2').val());
 changeWaiting(0);
 xajax_fmhistoryprojector_loadGrid(fromdate,todate);  
}
function fmhistoryprojector_viewdetail(id,from_date,to_date,projector_name){
    $('#fmhistoryprojector_divDetail_grid').html('');
    title = 'Chi tiết thời gian máy chiếu : '+ projector_name + ' từ ngày ' +from_date +' đến ngày ' + to_date;
    $('#fmhistoryprojector_divDetail').dialog('option','title',title);
     xajax_fmhistoryprojector_viewdetail(id,from_date,to_date);
}

$('#fmhistoryprojector_date1').val(GetCurrentDateTime(0,1,false,0)) ;
$('#fmhistoryprojector_date2').val(GetCurrentDateTime(0,0,false,0)) ;  

fmhistoryprojector_createReport();
 </script>